--------------------------------
-- Description
--------------------------------

The ODBC SimApi uses ODBC to connect to a database server.

See the User Guide for a list of features and installation instructions.

--------------------------------
-- Version 3.2.0
--------------------------------
2024-10-23

* Support for SIMCA-online 18's opt-in feature Concurrent SimApi Access:
  The SimApi uses a pool of database connections to enable concurrent database requests to improve performance.
  The default pool size is 10 and is also configurable in the SimApi's configuration file
  using the DatabaseConnectionPoolSize setting.
* Integration tests for concurrency

--------------------------------
-- Version 3.1.0
--------------------------------
2024-10-15

* Support for multiple nodes with discrete data. Each can have different settings.
* Support for datetime2 columns in batch nodes.
* Fix: Can't configure SimApi on PCs with file systems where short (8dot3) file names are disabled (bug 15171).
* Configuration dialog: added a View log button to make it easy to find the SimApi log file.
* The log file is now named ODBCSimApi_<InstanceName>.log and the configuration file is named
  ODBCSimApi_<InstanceName>.xml. The old files will be renamed when loading an old configuration.
* Log file improvements:
  * log SimApi version at startup.
  * log information about the ODBC server and connection.
  * streamline logging: remove unnecessary logging and improve context for logged events.
  * no longer add a log entry for each database row when reading historical data which
    improves performance for large queries when Debug-logging is enabled.
  * more context information, such as the node name of the node logging the message.
* User Guide updated with more guidance relating to performance and how to set up the SimApi.

--------------------------------
-- Version 3.0.0
--------------------------------
2024-10-04

* Enabled support for Redshift databases with Unicode-only support in their ODBC drivers.
  Previous versions of the ODBC SimApi uses ANSI and that didn't work with Redshift.
* Updated C++ compiler and toolset, so that the SimApi now requires the
  Microsoft Visual C++ Redistributable Version 2015-2022. This is already installed on a
  PC with SIMCA and SIMCA-online.
* Fix: Write back historical data fails with for null values with message: Incorrect syntax near ',' (bug 56666).
* Enabled support for columns of nvarchar type.
* The SqlDialect setting in the configuration file is now case insensitive.

--------------------------------
-- Version 2.1.9
--------------------------------
2019-05-03

* forwardOnly is used (instead of snapshot) for direct mode continuous/process views and batch node views.

--------------------------------
-- Version 2.1.8
--------------------------------
2018-02-26

* Fixed bug: Can't write back data for tags.

--------------------------------
-- Version 2.1.7
--------------------------------
2018-01-16

* Fixed crash bug when reading current data from batch node.

--------------------------------
-- Version 2.1.6
--------------------------------
2017-09-29

* Updated documentation and icon.

--------------------------------
-- Version 2.1.5
--------------------------------
2017-08-04

* Fixed bug when using the mysql dialect would generate an incorrect sql query

--------------------------------
-- Version 2.1.4
--------------------------------
2017-03-17

* New feature: Support for specifying select statement terminator character, default is ";".
* New feature: Support filtering on a column in the batch node.
* New feature: Support if database (Oracle) uses UTC time instead of local time.
* Fixed "column ambiguously defined" bug when reading batch condition data in Oracle.
* Fixed settings are not written over for "BatchDataView" and "BatchNode with optional filter support" when credentials dialog is used.
* Optimization when querying for batches active during a time period.

--------------------------------
-- Version 2.1.3
--------------------------------
2016-03-02

* Fixed bug when "TimeColumn" and "NumSyntheticBatchTags" settings aren't configured for a BatchDataView in the configuration file.

--------------------------------
-- Version 2.1.2
--------------------------------
2015-10-19

* Fixed bug when Lookup table is used and tags are configured against different tables, this caused read current data to fail.

--------------------------------
-- Version 2.1.1
--------------------------------
2015-06-25

* New feature: Support for synthetic batch data tags for multiple instance batch data in a BatchDataView.
* New feature: Support for synthetic process batch id filtered on column values in a BatchDataView.

--------------------------------
-- Version 2.1.0
--------------------------------
2015-01-14

* New feature: support for multiple instances of the SimApi on the same SIMCA-online server, connecting to different databases.
* New feature Direct Mode for continuous data: a simpler way to expose data through the SimApi.
* New feature BatchDataView for reading batch data (batch conditions) from two-columns (tag name and value).
* Fixed bugs in WriteHistoricalData (for continuous nodes) and WriteBatchData (for batch nodes) where
  pointer addresses were written instead of values.
* ReadDiscreteData now logs database error messages to the log file.
* The XML configuration file now contains comments, and easier to understand default values for settings.
* Improved the user guide with information about Direct Mode, BatchDataView, write back and more.

--------------------------------
-- Version 2.0.10
--------------------------------
2014-01-23

* Fixed bug when synthetic process batch id is used, also in combination with unit id.
* Documented the feature for Generated synthetic process batch id tags; one per unique unit id.

--------------------------------
-- Version 2.0.9
--------------------------------
2013-11-26

* Fixed a bug in an SQL query that caused an error when fetching the batch node start time.

--------------------------------
-- Version 2.0.8
--------------------------------
2013-11-07

* Support for reading discrete data from the database.
* Major revision of the user guide.

--------------------------------
-- Version 2.0.7
--------------------------------
2013-09-23

* Fixed bug that returned a SimApi error and logged "Invalid cursor state" in the SimApi's log file when
  a SQL query didn't return any rows. This also meant that execution was incorrectly stopped in SIMCA-online
  when this happened. The corrected SimApi now returns missing values (no data) as expected.

* Fixed a bug that crashed the SimApi when reading historical data in sparse data in some cases. This
  occurred when requesting more observations from the SimApi than was available in the data source,
  e.g. when reading high frequency data from a sparse data source.

* Implemented reading nvarchar columns from the database.

--------------------------------
-- Version 2.0.6
--------------------------------
2012-11-22

* Now ignores NULL values in the date/time column when reading process data.

* Fixed a SQL syntax bug in BatchNode::ReadCurrentData() that prevented that function from working correctly
  (this function is used for example when reading batch conditions from the batch node during real time prediction)

--------------------------------
-- Version 2.0.5
--------------------------------
2012-11-13

* New feature: Automatically reconnect to the database after communication problems.
  Previously a lost connection with the database was only reestablished when the SIMCA-online service was restarted.
  This has been changed so that the database connection is closed on each error. Then on the next database call
  an attempt will be made to reopen the connection.

* Fixed a bug that prevented the truncation of the log file when it reached the Log File Size
  set in the configuration.

* Automatically increments build number on each build.

* Added digital signature to the built DLL.

--------------------------------
-- Version 2.0.4
--------------------------------
2012-11-09

* Oracle dialect: Fixed incorrect usage of ROWNUM to limit data read in TOP N queries.

--------------------------------
-- Version 2.0.3
--------------------------------
2012-11-01

* Fixed bug with ReadHostoricalDataEx.
* Added SQLDialect to documentation.

--------------------------------
-- Version 2.0.2
--------------------------------

* Improved error handling, implemented Fetch Historical data in bulk.

--------------------------------
-- Version 2.0.1
--------------------------------

* Added possibility to have a Batch Table with units that will generate a batch id tag per
  unique unit. The column is identified by a setting with key "BatchIDUnitField". The units
  need to exist already at startup of the server in order for this fix to work. The new tags
  will be called BatchID_Unit_<unit>.

--------------------------------
-- Version 2.0.0
--------------------------------

* Restructured the Source Files
